3.1.49 \(\int (c+d x) (a+b \cot (e+f x))^3 \, dx\) [49]

3.1.49.1 Optimal result
3.1.49.2 Mathematica [A] (verified)
3.1.49.3 Rubi [A] (verified)
3.1.49.4 Maple [B] (verified)
3.1.49.5 Fricas [B] (verification not implemented)
3.1.49.6 Sympy [F]
3.1.49.7 Maxima [B] (verification not implemented)
3.1.49.8 Giac [F]
3.1.49.9 Mupad [F(-1)]

3.1.49.1 Optimal result

Integrand size = 18, antiderivative size = 278 \[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=-3 a b^2 c x-\frac {b^3 d x}{2 f}-\frac {3}{2} a b^2 d x^2+\frac {a^3 (c+d x)^2}{2 d}-\frac {3 i a^2 b (c+d x)^2}{2 d}+\frac {i b^3 (c+d x)^2}{2 d}-\frac {b^3 d \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x) \cot (e+f x)}{f}-\frac {b^3 (c+d x) \cot ^2(e+f x)}{2 f}+\frac {3 a^2 b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}+\frac {3 a b^2 d \log (\sin (e+f x))}{f^2}-\frac {3 i a^2 b d \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {i b^3 d \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2} \]

output
-3*a*b^2*c*x-1/2*b^3*d*x/f-3/2*a*b^2*d*x^2+1/2*a^3*(d*x+c)^2/d-3/2*I*a^2*b 
*(d*x+c)^2/d+1/2*I*b^3*(d*x+c)^2/d-1/2*b^3*d*cot(f*x+e)/f^2-3*a*b^2*(d*x+c 
)*cot(f*x+e)/f-1/2*b^3*(d*x+c)*cot(f*x+e)^2/f+3*a^2*b*(d*x+c)*ln(1-exp(2*I 
*(f*x+e)))/f-b^3*(d*x+c)*ln(1-exp(2*I*(f*x+e)))/f+3*a*b^2*d*ln(sin(f*x+e)) 
/f^2-3/2*I*a^2*b*d*polylog(2,exp(2*I*(f*x+e)))/f^2+1/2*I*b^3*d*polylog(2,e 
xp(2*I*(f*x+e)))/f^2
 
3.1.49.2 Mathematica [A] (verified)

Time = 12.40 (sec) , antiderivative size = 433, normalized size of antiderivative = 1.56 \[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=\frac {(a+b \cot (e+f x))^3 \sin (e+f x) \left (\left (-a^3 d e^2-3 i a^2 b d e^2+3 a b^2 d e^2+i b^3 d e^2+2 a^3 c e f-6 a b^2 c e f-6 i a^2 b d e f x+2 i b^3 d e f x+2 a^3 c f^2 x-6 a b^2 c f^2 x+a^3 d f^2 x^2-3 i a^2 b d f^2 x^2-3 a b^2 d f^2 x^2+i b^3 d f^2 x^2-2 b \left (-3 a^2+b^2\right ) d (e+f x) \log \left (1-e^{2 i (e+f x)}\right )+2 b \left (3 a b d+b^2 (d e-c f)+a^2 (-3 d e+3 c f)\right ) \log (\cos (e+f x))+6 a b^2 d \log (\tan (e+f x))-6 a^2 b d e \log (\tan (e+f x))+2 b^3 d e \log (\tan (e+f x))+6 a^2 b c f \log (\tan (e+f x))-2 b^3 c f \log (\tan (e+f x))\right ) \sin ^2(e+f x)+i b \left (-3 a^2+b^2\right ) d \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right ) \sin ^2(e+f x)-\frac {1}{2} b^2 (2 b f (c+d x)+(b d+6 a f (c+d x)) \sin (2 (e+f x)))\right )}{2 f^2 (b \cos (e+f x)+a \sin (e+f x))^3} \]

input
Integrate[(c + d*x)*(a + b*Cot[e + f*x])^3,x]
 
output
((a + b*Cot[e + f*x])^3*Sin[e + f*x]*((-(a^3*d*e^2) - (3*I)*a^2*b*d*e^2 + 
3*a*b^2*d*e^2 + I*b^3*d*e^2 + 2*a^3*c*e*f - 6*a*b^2*c*e*f - (6*I)*a^2*b*d* 
e*f*x + (2*I)*b^3*d*e*f*x + 2*a^3*c*f^2*x - 6*a*b^2*c*f^2*x + a^3*d*f^2*x^ 
2 - (3*I)*a^2*b*d*f^2*x^2 - 3*a*b^2*d*f^2*x^2 + I*b^3*d*f^2*x^2 - 2*b*(-3* 
a^2 + b^2)*d*(e + f*x)*Log[1 - E^((2*I)*(e + f*x))] + 2*b*(3*a*b*d + b^2*( 
d*e - c*f) + a^2*(-3*d*e + 3*c*f))*Log[Cos[e + f*x]] + 6*a*b^2*d*Log[Tan[e 
 + f*x]] - 6*a^2*b*d*e*Log[Tan[e + f*x]] + 2*b^3*d*e*Log[Tan[e + f*x]] + 6 
*a^2*b*c*f*Log[Tan[e + f*x]] - 2*b^3*c*f*Log[Tan[e + f*x]])*Sin[e + f*x]^2 
 + I*b*(-3*a^2 + b^2)*d*PolyLog[2, E^((2*I)*(e + f*x))]*Sin[e + f*x]^2 - ( 
b^2*(2*b*f*(c + d*x) + (b*d + 6*a*f*(c + d*x))*Sin[2*(e + f*x)]))/2))/(2*f 
^2*(b*Cos[e + f*x] + a*Sin[e + f*x])^3)
 
3.1.49.3 Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 276, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 4205, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x) (a+b \cot (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x) \left (a-b \tan \left (e+f x+\frac {\pi }{2}\right )\right )^3dx\)

\(\Big \downarrow \) 4205

\(\displaystyle \int \left (a^3 (c+d x)+3 a^2 b (c+d x) \cot (e+f x)+3 a b^2 (c+d x) \cot ^2(e+f x)+b^3 (c+d x) \cot ^3(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 (c+d x)^2}{2 d}+\frac {3 a^2 b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i a^2 b (c+d x)^2}{2 d}-\frac {3 i a^2 b d \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}-\frac {3 a b^2 (c+d x) \cot (e+f x)}{f}-\frac {3 a b^2 (c+d x)^2}{2 d}+\frac {3 a b^2 d \log (\sin (e+f x))}{f^2}-\frac {b^3 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x) \cot ^2(e+f x)}{2 f}+\frac {i b^3 (c+d x)^2}{2 d}+\frac {i b^3 d \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}-\frac {b^3 d \cot (e+f x)}{2 f^2}-\frac {b^3 d x}{2 f}\)

input
Int[(c + d*x)*(a + b*Cot[e + f*x])^3,x]
 
output
-1/2*(b^3*d*x)/f + (a^3*(c + d*x)^2)/(2*d) - (((3*I)/2)*a^2*b*(c + d*x)^2) 
/d - (3*a*b^2*(c + d*x)^2)/(2*d) + ((I/2)*b^3*(c + d*x)^2)/d - (b^3*d*Cot[ 
e + f*x])/(2*f^2) - (3*a*b^2*(c + d*x)*Cot[e + f*x])/f - (b^3*(c + d*x)*Co 
t[e + f*x]^2)/(2*f) + (3*a^2*b*(c + d*x)*Log[1 - E^((2*I)*(e + f*x))])/f - 
 (b^3*(c + d*x)*Log[1 - E^((2*I)*(e + f*x))])/f + (3*a*b^2*d*Log[Sin[e + f 
*x]])/f^2 - (((3*I)/2)*a^2*b*d*PolyLog[2, E^((2*I)*(e + f*x))])/f^2 + ((I/ 
2)*b^3*d*PolyLog[2, E^((2*I)*(e + f*x))])/f^2
 

3.1.49.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4205
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 
3.1.49.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 744 vs. \(2 (248 ) = 496\).

Time = 0.72 (sec) , antiderivative size = 745, normalized size of antiderivative = 2.68

method result size
risch \(-i b^{3} c x +\frac {i b^{3} d \,x^{2}}{2}+\frac {b^{2} \left (-6 i a d f x \,{\mathrm e}^{2 i \left (f x +e \right )}-6 i a c f \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b d f x \,{\mathrm e}^{2 i \left (f x +e \right )}+6 i a d f x -i b d \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b c f \,{\mathrm e}^{2 i \left (f x +e \right )}+6 i a c f +i b d \right )}{f^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {b^{3} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}+\frac {2 b^{3} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}-\frac {b^{3} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}+\frac {a^{3} d \,x^{2}}{2}+a^{3} c x -3 a \,b^{2} c x -\frac {3 a \,b^{2} d \,x^{2}}{2}-\frac {6 i b \,a^{2} d e x}{f}-\frac {3 i a^{2} b d \,x^{2}}{2}-\frac {b^{3} d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}-\frac {b^{3} d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {i b^{3} d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {i b^{3} d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {3 b^{2} a d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f^{2}}-\frac {6 b^{2} a d \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {3 b^{2} a d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f^{2}}+\frac {3 b \,a^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}-\frac {6 b \,a^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}+\frac {3 b \,a^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {2 b^{3} e d \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {b^{3} e d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f^{2}}+\frac {i b^{3} d \,e^{2}}{f^{2}}-\frac {b^{3} d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x}{f}+3 i a^{2} b c x +\frac {6 b e d \,a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {3 b e d \,a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f^{2}}+\frac {3 b \,a^{2} d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {3 b \,a^{2} d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x}{f}+\frac {3 b \,a^{2} d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}-\frac {3 i b \,a^{2} d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {3 i b \,a^{2} d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {3 i b \,a^{2} d \,e^{2}}{f^{2}}+\frac {2 i b^{3} d e x}{f}\) \(745\)

input
int((d*x+c)*(a+b*cot(f*x+e))^3,x,method=_RETURNVERBOSE)
 
output
-I*b^3*c*x+6/f^2*b*e*d*a^2*ln(exp(I*(f*x+e)))-3/f^2*b*e*d*a^2*ln(exp(I*(f* 
x+e))-1)+3/f*b*a^2*d*ln(1-exp(I*(f*x+e)))*x+3/f*b*a^2*d*ln(exp(I*(f*x+e))+ 
1)*x+3/f^2*b*a^2*d*ln(1-exp(I*(f*x+e)))*e-3*I/f^2*b*a^2*d*polylog(2,exp(I* 
(f*x+e)))-3*I/f^2*b*a^2*d*polylog(2,-exp(I*(f*x+e)))-3*I/f^2*b*a^2*d*e^2+2 
*I/f*b^3*d*e*x-6*I/f*b*a^2*d*e*x+1/2*a^3*d*x^2+a^3*c*x+1/2*I*b^3*d*x^2+b^2 
*(-6*I*a*d*f*x*exp(2*I*(f*x+e))-6*I*a*c*f*exp(2*I*(f*x+e))+2*b*d*f*x*exp(2 
*I*(f*x+e))+6*I*a*d*f*x-I*b*d*exp(2*I*(f*x+e))+2*b*c*f*exp(2*I*(f*x+e))+6* 
I*a*c*f+I*b*d)/f^2/(exp(2*I*(f*x+e))-1)^2-3*a*b^2*c*x-3/2*a*b^2*d*x^2-3/2* 
I*a^2*b*d*x^2-1/f*b^3*d*ln(1-exp(I*(f*x+e)))*x-1/f^2*b^3*d*ln(1-exp(I*(f*x 
+e)))*e+I/f^2*b^3*d*polylog(2,exp(I*(f*x+e)))+I/f^2*b^3*d*polylog(2,-exp(I 
*(f*x+e)))+3/f^2*b^2*a*d*ln(exp(I*(f*x+e))+1)-6/f^2*b^2*a*d*ln(exp(I*(f*x+ 
e)))+3/f^2*b^2*a*d*ln(exp(I*(f*x+e))-1)+3/f*b*a^2*c*ln(exp(I*(f*x+e))+1)-6 
/f*b*a^2*c*ln(exp(I*(f*x+e)))+3/f*b*a^2*c*ln(exp(I*(f*x+e))-1)-2/f^2*b^3*e 
*d*ln(exp(I*(f*x+e)))+1/f^2*b^3*e*d*ln(exp(I*(f*x+e))-1)+I/f^2*b^3*d*e^2-1 
/f*b^3*d*ln(exp(I*(f*x+e))+1)*x+3*I*a^2*b*c*x-1/f*b^3*c*ln(exp(I*(f*x+e))+ 
1)+2/f*b^3*c*ln(exp(I*(f*x+e)))-1/f*b^3*c*ln(exp(I*(f*x+e))-1)
 
3.1.49.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 721 vs. \(2 (242) = 484\).

Time = 0.29 (sec) , antiderivative size = 721, normalized size of antiderivative = 2.59 \[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=-\frac {2 \, {\left (a^{3} - 3 \, a b^{2}\right )} d f^{2} x^{2} - 4 \, b^{3} c f - 4 \, {\left (b^{3} d f - {\left (a^{3} - 3 \, a b^{2}\right )} c f^{2}\right )} x - 2 \, {\left ({\left (a^{3} - 3 \, a b^{2}\right )} d f^{2} x^{2} + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} c f^{2} x\right )} \cos \left (2 \, f x + 2 \, e\right ) - {\left (-i \, {\left (3 \, a^{2} b - b^{3}\right )} d \cos \left (2 \, f x + 2 \, e\right ) + i \, {\left (3 \, a^{2} b - b^{3}\right )} d\right )} {\rm Li}_2\left (\cos \left (2 \, f x + 2 \, e\right ) + i \, \sin \left (2 \, f x + 2 \, e\right )\right ) - {\left (i \, {\left (3 \, a^{2} b - b^{3}\right )} d \cos \left (2 \, f x + 2 \, e\right ) - i \, {\left (3 \, a^{2} b - b^{3}\right )} d\right )} {\rm Li}_2\left (\cos \left (2 \, f x + 2 \, e\right ) - i \, \sin \left (2 \, f x + 2 \, e\right )\right ) + 2 \, {\left (3 \, a b^{2} d - {\left (3 \, a^{2} b - b^{3}\right )} d e + {\left (3 \, a^{2} b - b^{3}\right )} c f - {\left (3 \, a b^{2} d - {\left (3 \, a^{2} b - b^{3}\right )} d e + {\left (3 \, a^{2} b - b^{3}\right )} c f\right )} \cos \left (2 \, f x + 2 \, e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, f x + 2 \, e\right ) + \frac {1}{2} i \, \sin \left (2 \, f x + 2 \, e\right ) + \frac {1}{2}\right ) + 2 \, {\left (3 \, a b^{2} d - {\left (3 \, a^{2} b - b^{3}\right )} d e + {\left (3 \, a^{2} b - b^{3}\right )} c f - {\left (3 \, a b^{2} d - {\left (3 \, a^{2} b - b^{3}\right )} d e + {\left (3 \, a^{2} b - b^{3}\right )} c f\right )} \cos \left (2 \, f x + 2 \, e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, f x + 2 \, e\right ) - \frac {1}{2} i \, \sin \left (2 \, f x + 2 \, e\right ) + \frac {1}{2}\right ) + 2 \, {\left ({\left (3 \, a^{2} b - b^{3}\right )} d f x + {\left (3 \, a^{2} b - b^{3}\right )} d e - {\left ({\left (3 \, a^{2} b - b^{3}\right )} d f x + {\left (3 \, a^{2} b - b^{3}\right )} d e\right )} \cos \left (2 \, f x + 2 \, e\right )\right )} \log \left (-\cos \left (2 \, f x + 2 \, e\right ) + i \, \sin \left (2 \, f x + 2 \, e\right ) + 1\right ) + 2 \, {\left ({\left (3 \, a^{2} b - b^{3}\right )} d f x + {\left (3 \, a^{2} b - b^{3}\right )} d e - {\left ({\left (3 \, a^{2} b - b^{3}\right )} d f x + {\left (3 \, a^{2} b - b^{3}\right )} d e\right )} \cos \left (2 \, f x + 2 \, e\right )\right )} \log \left (-\cos \left (2 \, f x + 2 \, e\right ) - i \, \sin \left (2 \, f x + 2 \, e\right ) + 1\right ) - 2 \, {\left (6 \, a b^{2} d f x + 6 \, a b^{2} c f + b^{3} d\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, {\left (f^{2} \cos \left (2 \, f x + 2 \, e\right ) - f^{2}\right )}} \]

input
integrate((d*x+c)*(a+b*cot(f*x+e))^3,x, algorithm="fricas")
 
output
-1/4*(2*(a^3 - 3*a*b^2)*d*f^2*x^2 - 4*b^3*c*f - 4*(b^3*d*f - (a^3 - 3*a*b^ 
2)*c*f^2)*x - 2*((a^3 - 3*a*b^2)*d*f^2*x^2 + 2*(a^3 - 3*a*b^2)*c*f^2*x)*co 
s(2*f*x + 2*e) - (-I*(3*a^2*b - b^3)*d*cos(2*f*x + 2*e) + I*(3*a^2*b - b^3 
)*d)*dilog(cos(2*f*x + 2*e) + I*sin(2*f*x + 2*e)) - (I*(3*a^2*b - b^3)*d*c 
os(2*f*x + 2*e) - I*(3*a^2*b - b^3)*d)*dilog(cos(2*f*x + 2*e) - I*sin(2*f* 
x + 2*e)) + 2*(3*a*b^2*d - (3*a^2*b - b^3)*d*e + (3*a^2*b - b^3)*c*f - (3* 
a*b^2*d - (3*a^2*b - b^3)*d*e + (3*a^2*b - b^3)*c*f)*cos(2*f*x + 2*e))*log 
(-1/2*cos(2*f*x + 2*e) + 1/2*I*sin(2*f*x + 2*e) + 1/2) + 2*(3*a*b^2*d - (3 
*a^2*b - b^3)*d*e + (3*a^2*b - b^3)*c*f - (3*a*b^2*d - (3*a^2*b - b^3)*d*e 
 + (3*a^2*b - b^3)*c*f)*cos(2*f*x + 2*e))*log(-1/2*cos(2*f*x + 2*e) - 1/2* 
I*sin(2*f*x + 2*e) + 1/2) + 2*((3*a^2*b - b^3)*d*f*x + (3*a^2*b - b^3)*d*e 
 - ((3*a^2*b - b^3)*d*f*x + (3*a^2*b - b^3)*d*e)*cos(2*f*x + 2*e))*log(-co 
s(2*f*x + 2*e) + I*sin(2*f*x + 2*e) + 1) + 2*((3*a^2*b - b^3)*d*f*x + (3*a 
^2*b - b^3)*d*e - ((3*a^2*b - b^3)*d*f*x + (3*a^2*b - b^3)*d*e)*cos(2*f*x 
+ 2*e))*log(-cos(2*f*x + 2*e) - I*sin(2*f*x + 2*e) + 1) - 2*(6*a*b^2*d*f*x 
 + 6*a*b^2*c*f + b^3*d)*sin(2*f*x + 2*e))/(f^2*cos(2*f*x + 2*e) - f^2)
 
3.1.49.6 Sympy [F]

\[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=\int \left (a + b \cot {\left (e + f x \right )}\right )^{3} \left (c + d x\right )\, dx \]

input
integrate((d*x+c)*(a+b*cot(f*x+e))**3,x)
 
output
Integral((a + b*cot(e + f*x))**3*(c + d*x), x)
 
3.1.49.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2017 vs. \(2 (242) = 484\).

Time = 0.78 (sec) , antiderivative size = 2017, normalized size of antiderivative = 7.26 \[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=\text {Too large to display} \]

input
integrate((d*x+c)*(a+b*cot(f*x+e))^3,x, algorithm="maxima")
 
output
1/2*(2*(f*x + e)*a^3*c + (f*x + e)^2*a^3*d/f - 2*(f*x + e)*a^3*d*e/f + 6*a 
^2*b*c*log(sin(f*x + e)) - 6*a^2*b*d*e*log(sin(f*x + e))/f - 2*(12*a*b^2*d 
*e - 12*a*b^2*c*f + (3*a^2*b - 3*I*a*b^2 - b^3)*(f*x + e)^2*d - 2*b^3*d - 
2*((-3*I*a*b^2 - b^3)*d*e + (3*I*a*b^2 + b^3)*c*f)*(f*x + e) - 2*(b^3*d*e 
- b^3*c*f + 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d + (b^3*d*e - b^3*c*f + 
 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d)*cos(4*f*x + 4*e) - 2*(b^3*d*e - 
b^3*c*f + 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d)*cos(2*f*x + 2*e) + (I*b 
^3*d*e - I*b^3*c*f + 3*I*a*b^2*d + (3*I*a^2*b - I*b^3)*(f*x + e)*d)*sin(4* 
f*x + 4*e) + 2*(-I*b^3*d*e + I*b^3*c*f - 3*I*a*b^2*d + (-3*I*a^2*b + I*b^3 
)*(f*x + e)*d)*sin(2*f*x + 2*e))*arctan2(sin(f*x + e), cos(f*x + e) + 1) - 
 2*(b^3*d*e - b^3*c*f + 3*a*b^2*d + (b^3*d*e - b^3*c*f + 3*a*b^2*d)*cos(4* 
f*x + 4*e) - 2*(b^3*d*e - b^3*c*f + 3*a*b^2*d)*cos(2*f*x + 2*e) + (I*b^3*d 
*e - I*b^3*c*f + 3*I*a*b^2*d)*sin(4*f*x + 4*e) + 2*(-I*b^3*d*e + I*b^3*c*f 
 - 3*I*a*b^2*d)*sin(2*f*x + 2*e))*arctan2(sin(f*x + e), cos(f*x + e) - 1) 
+ 2*((3*a^2*b - b^3)*(f*x + e)*d*cos(4*f*x + 4*e) - 2*(3*a^2*b - b^3)*(f*x 
 + e)*d*cos(2*f*x + 2*e) - (-3*I*a^2*b + I*b^3)*(f*x + e)*d*sin(4*f*x + 4* 
e) - 2*(3*I*a^2*b - I*b^3)*(f*x + e)*d*sin(2*f*x + 2*e) + (3*a^2*b - b^3)* 
(f*x + e)*d)*arctan2(sin(f*x + e), -cos(f*x + e) + 1) + ((3*a^2*b - 3*I*a* 
b^2 - b^3)*(f*x + e)^2*d + 2*(6*a*b^2*d - (-3*I*a*b^2 - b^3)*d*e - (3*I*a* 
b^2 + b^3)*c*f)*(f*x + e))*cos(4*f*x + 4*e) - 2*((3*a^2*b - 3*I*a*b^2 -...
 
3.1.49.8 Giac [F]

\[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=\int { {\left (d x + c\right )} {\left (b \cot \left (f x + e\right ) + a\right )}^{3} \,d x } \]

input
integrate((d*x+c)*(a+b*cot(f*x+e))^3,x, algorithm="giac")
 
output
integrate((d*x + c)*(b*cot(f*x + e) + a)^3, x)
 
3.1.49.9 Mupad [F(-1)]

Timed out. \[ \int (c+d x) (a+b \cot (e+f x))^3 \, dx=\int {\left (a+b\,\mathrm {cot}\left (e+f\,x\right )\right )}^3\,\left (c+d\,x\right ) \,d x \]

input
int((a + b*cot(e + f*x))^3*(c + d*x),x)
 
output
int((a + b*cot(e + f*x))^3*(c + d*x), x)